home *** CD-ROM | disk | FTP | other *** search
-
-
-
- mmmmddddRRRReeeecccceeeeiiiivvvveeee((((3333ddddmmmm)))) mmmmddddRRRReeeecccceeeeiiiivvvveeee((((3333ddddmmmm))))
-
-
-
- NNNNAAAAMMMMEEEE
- mdReceive - Accept MIDI events from a port
-
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////mmmmiiiiddddiiii....hhhh>>>>
-
- iiiinnnntttt mmmmddddRRRReeeecccceeeeiiiivvvveeee((((MMMMDDDDppppoooorrrrtttt ppppoooorrrrtttt,,,, MMMMDDDDeeeevvvveeeennnntttt ****eeeevvvvbbbbuuuuffff,,,, iiiinnnntttt ccccoooouuuunnnntttt))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- mmmmddddRRRReeeecccceeeeiiiivvvveeee reads MIDI events from the MIDI interface associated with _p_o_r_t
- into the _e_v_b_u_f array. _e_v_b_u_f must be allocated by the user and must
- contain space for _c_o_u_n_t MDevent structures. For most events, the actual
- MIDI event is stored in the _m_s_g array of the MDevent, and the _s_t_a_m_p field
- is set to a stamp value whose format is determined by the port's stamping
- mode (see mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee).
-
- In addition, when a system exclusive event is received, the MIDI library
- allocates a block of memory for the system exclusive data and places a
- pointer to the block of memory in the _s_y_s_e_x_m_s_g field of the event
- structure. The _m_s_g[_0] byte in the MDevent structure contains a 0xF0
- (MD_SYSEX) to indicate that a system exclusive message has arrived. The
- _m_s_g_l_e_n field contains a count of the bytes in data buffer. Long system
- exclusive messages may be decomposed into smaller chunks; the last
- message will have an 0xF7 (EOX) at the end of the _s_y_s_e_x_m_s_g buffer.
-
- The application must release the sysexmsg buffer with mmmmddddFFFFrrrreeeeeeee((((3333ddddmmmm)))) once it
- is finished processing the message.
-
- If no events are available when mdReceive is called, the routine will
- block until one or more events arrive. The application can avoid
- blocking by calling sssseeeelllleeeecccctttt((((2222)))) on the file descriptor returned by
- mmmmddddGGGGeeeettttFFFFdddd((((3333ddddmmmm)))) before calling mdReceive. mdReceive returns the number of
- events read.
-
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- mdReceive returns the number of messages read from the given port, or -1
- on error. The following error codes are expected:
-
- ENOMEM - No memory was available for incoming message storage.
-
- EFAULT - An invalid address was passed to the MIDI driver
-
- EINVAL - An undefined operation was called.
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- mmmmddddIIIInnnnttttrrrroooo((((3333ddddmmmm)))), mmmmddddFFFFrrrreeeeeeee((((3333ddddmmmm)))), mmmmddddSSSSeeeennnndddd((((3333ddddmmmm)))), mmmmvvvvddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-